package com.zhike.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zhike.model.Equipment;
import com.zhike.service.EquipmentService;


@Controller
public class EquipmentController {

	@Autowired
	EquipmentService equipmentService;
	
	/**
	 * 设备列表
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value="api/equipmentList",method=RequestMethod.GET,produces="application/json;charset=utf-8")
	private String equipmentList(Equipment equipment) {
		String str	= equipmentService.equipmentList(equipment);
		return str;
		
	}
	
	/**
	 * 设备使用记录
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value="api/equipmentRecordList",method=RequestMethod.GET,produces="application/json;charset=utf-8")
	private String equipmentRecordList(Equipment equipment) {
		String str	= equipmentService.equipmentRecordList(equipment);
		return str;
		
	}
}
